package myspring.lifeperiod;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * <pre>
 *   Title: TestLife.java
 *   Description: 
 *   Copyright: yundaex.com Copyright (c) 2013
 *   Company: 上海韵达货运有限公司
 * </pre>
 * 
 * @author liuzhaoqing
 * @version 1.0
 * @date 2014年10月30日
 */
public class TestLife {

	public static void main(String[] args) {
		AbstractApplicationContext cxt = new ClassPathXmlApplicationContext("spring-context.xml");
		Person person = cxt.getBean("chinese", Chinese.class);
		person.useAxe();
		// 为容器注册关闭钩子(非web应用)
		cxt.registerShutdownHook();
	}

}
